

import App from './App'

import Vuex from 'vuex'

import router from './routers'
import apiexception from './api/exception'


import './assets/css/icon.css';
import VueCodeMirror from 'vue-codemirror'
import 'element-ui/lib/theme-chalk/index.css';
import './components/common/directives';
Vue.use(ELEMENT)


Vue.use(Vuex)
Vue.use(VueCodeMirror)





router.beforeEach((to, from, next) => {

  if (to.path == '/login') {
    localStorage.removeItem('token');
  }
  //let token = localStorage.getItem('token');
  if (to.fullPath==='/') {
   　
    next({ path: '/oa/workflow/process/1'});
  } else {
    next()
  }
})



new Vue({
  //el: '#app',
  //template: '<App/>',
  router,

  components: { App },
  render: h => h(App)
}).$mount('#app')

